﻿using System;
using System.Windows.Forms;

namespace Map_Creator
{
    public partial class NewDataGrid : Form
    {
        public string ChoosenName;
        public Type ChoosenType;

        private static int count;

        public NewDataGrid()
        {
            InitializeComponent();
            NameTextBox.Text = "DataGrid" + count.ToString();
            count++;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            switch (TypeComboBox.SelectedItem.ToString())
            {
                case "Numeric":
                    ChoosenType = typeof (int);
                    break;
                case "Boolean":
                    ChoosenType = typeof(bool);
                    break;
            }
            ChoosenName = NameTextBox.Text;
            DialogResult = DialogResult.OK;
            Close();
        }
    }
}
